﻿using System.ComponentModel.DataAnnotations;
using FytSoa.Domain.Crm;

namespace FytSoa.Application.Crm.Param;

public class CrmWocOrderAdd : AppEntity
{
    /// <summary>
    /// 客户编号
    /// </summary>
    [Required]
    public long CustomerId { get; set; } = 0;

    /// <summary>
    /// 工单编号
    /// </summary>
    [Required]
    [StringLength(50)]
    public string Number { get; set; }

    /// <summary>
    /// 工单说明-标题
    /// </summary>
    [Required]
    [StringLength(500)]
    public string Title { get; set; }

    /// <summary>
    /// 状态（1=待接受2=处理中3=待审核4=已完成5=已关闭）
    /// </summary>
    [Required]
    public int Status { get; set; } = 1;

    /// <summary>
    /// 来源
    /// </summary>
    [Required]
    public long Source { get; set; } = 0;

    /// <summary>
    /// 工单类型
    /// </summary>
    [Required]
    public long Type { get; set; } = 0;

    /// <summary>
    /// 级别
    /// </summary>
    [Required]
    public long Level { get; set; } = 0;

    /// <summary>
    /// 标签
    /// </summary>
    public List<string> Tags { get; set; } = new();

    /// <summary>
    /// 处理限时
    /// </summary>
    public DateTime? TimeLimit { get; set; }

    /// <summary>
    /// 附件
    /// </summary>
    public string Files { get; set; }

    /// <summary>
    /// 派单人流程
    /// </summary>
    [Required]
    public List<CrmWocOrder.SendUserProgress> SendUser { get; set; } = new();

    /// <summary>
    /// 关联工单列表-数组
    /// </summary>
    public List<CrmWocOrder.RelevanceOrder> Relevance { get; set; } = new();

    /// <summary>
    /// 最后处理人
    /// </summary>
    public long LastProcessUserId { get; set; } = 0;

    /// <summary>
    /// 审核信息反馈
    /// </summary>
    public CrmWocOrder.AuditSuccess AuditSummary { get; set; } = new();
    
}